home *** CD-ROM | disk | FTP | other *** search
- Path: sargas.omicron.se!elias
- From: elias@omicron.se (Elias Martenson)
- Newsgroups: comp.lang.c
- Subject: Re: fopen() with a UNIX path?
- Date: 4 Jan 1996 15:27:02 GMT
- Organization: Omicron
- Message-ID: <4cgrk6$47d@sargas.omicron.se>
- References: <4cflfs$1m@acmez.gatech.edu>
- NNTP-Posting-Host: graffias.omicron.se
- Mime-Version: 1.0
- Content-Type: text/plain; charset=US-ASCII
- Content-Transfer-Encoding: 7bit
- X-Newsreader: NN version 6.5.0 #2 (NOV)
-
- gt1329a@prism.gatech.edu (David Ward) writes:
-
- > Hey everyone. Does anyone know why something like this doesn't work?
-
- > if ( in = fopen ("~/.friends", "r")) == NULL )
- ^^^^^
- This is your problem. The ~-sign is expanded by the shell, not by
- UNIX itself. You must parse this yourself.
-
- > The problem I'm having is that it won't find the file. If I put just
- >".friends" and run it in the same directory, it's fine... What am I doing
- >wrong?
-
- > Thanks
- > Dave
- >--
- >|David Ward | '85 300ZX Turbo IZCC #451 |
- >|gt1329a@prism.gatech.edu (404)206-9753 | The Internet Z-Car Club |
- >|http://www.cc.gatech.edu/people/home/davew/ | |
- >+--------------------------------------------+---------------------------+
- --
- Elias Martenson ! When I come up with a good joke,
- elias@omicron.se ! it will be here.
-